package com.hw.shortlink.admin.test;


public class SharedingSphere {

    private static final String sql="-- 1. 删除现有的索引 idx_unique_full_short_url\n" +
            "ALTER TABLE `tb_link_%d`\n" +
            "DROP INDEX `idx_unique_full_short_url`;\n" +
            "\n" +
            "-- 2. 创建新的联合索引 (full_short_url, del_time)\n" +
            "ALTER TABLE `tb_link_%d`\n" +
            "ADD unique INDEX `idx_unique_full_short_url_del_time` (`full_short_url`, `del_time`);\n";

    public static void main(String[] args) {
        for(int i=0;i<16 ;i++){
            System.out.printf(sql+"\n",i,i);
        }
    }
}
